Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1/4] Move methods under the redfishwrapper for reuse #369

Merged
merged 27 commits into from
Nov 29, 2023

Conversation

joelrebel
Copy link
Member

What does this PR implement/change/remove?

  • Moves the Inventory, Power*, GetBiosConfiguration methods under the redfishwrapper package for re-use by other providers.
  • A few fixes for the bmc/firmware interface methods - to collect errors in the client metadata obj.

This is to allow each vendor/OEM provider to re-use and extend these methods.

Checklist

  • Tests added
  • Similar commits squashed

This enables other providers to reuse the Inventory method and customise
its use based on the vendor/model
The FirmwareUpload and related methods in redfishwrapper are more
generic and can be re-used by providers with OEM specific update
parameters. Having these methods in the redfish provider makes it
cumbersome to maintain and extend.
…pper

The wrapper provides implementations other providers can call into for
code reuse
…oved method internals

into the redfishwrapper so they can be reused by other providers
This helps with debugging failed tasks
@joelrebel joelrebel changed the title Move methods under the redfishwrapper for reuse [1/4] Move methods under the redfishwrapper for reuse Nov 27, 2023
Copy link
Collaborator

@ofaurax ofaurax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All OK but test and lint fail

@joelrebel
Copy link
Member Author

All OK but test and lint fail

@ofaurax this is 1/4 PR, the 4th PR #372 when merged will clear tests and linting

[3/4] redfish/GetBiosConfiguration: move tests and fixtures
Copy link

codecov bot commented Nov 29, 2023

Codecov Report

Attention: 226 lines in your changes are missing coverage. Please review.

Comparison is base (b565dd4) 44.60% compared to head (ee0f228) 43.87%.

Files Patch % Lines
providers/dell/firmware.go 9.34% 96 Missing and 1 partial ⚠️
internal/redfishwrapper/inventory.go 11.76% 45 Missing ⚠️
internal/redfishwrapper/inventory_collect.go 10.34% 26 Missing ⚠️
providers/supermicro/supermicro.go 30.43% 14 Missing and 2 partials ⚠️
internal/redfishwrapper/power.go 0.00% 14 Missing ⚠️
client.go 0.00% 7 Missing ⚠️
internal/redfishwrapper/task.go 76.19% 3 Missing and 2 partials ⚠️
providers/redfish/redfish.go 0.00% 5 Missing ⚠️
providers/dell/idrac.go 69.23% 4 Missing ⚠️
internal/redfishwrapper/system.go 40.00% 3 Missing ⚠️
... and 3 more
Additional details and impacted files
@@                       Coverage Diff                       @@
##           devel-rework-redfishwrapper     #369      +/-   ##
===============================================================
- Coverage                        44.60%   43.87%   -0.74%     
===============================================================
  Files                               61       59       -2     
  Lines                             5206     5042     -164     
===============================================================
- Hits                              2322     2212     -110     
+ Misses                            2628     2608      -20     
+ Partials                           256      222      -34     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@ofaurax ofaurax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lots of changes!

@joelrebel joelrebel merged commit afda0c3 into devel-rework-redfishwrapper Nov 29, 2023
5 of 7 checks passed
@joelrebel joelrebel deleted the redfishwrapper-methods branch November 29, 2023 09:32
@joelrebel joelrebel mentioned this pull request Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants